var munbolClass = {
	win: null,
	layout: null,
	form: null,
	grid: null,
	actionBar: null,	
	widgetWin: function(){
        var me = this;
		var windows = new dhtmlXWindows();
		me.win = windows.createWindow('window_1', 0, 0, 500, 300);
		me.win.setText('Boletas de Asignaci&oacute;n a Usuario');
		me.win.clearIcon();
		me.win.button('park').hide();
		me.win.button('minmax1').hide();
		me.win.denyResize();
		me.win.setModal(1);
		me.win.centerOnScreen();
        me.layout = me.win.attachLayout('1C');
	},	
	widgetGrid: function(){	
		var me = this;	
		var panel = me.layout.cells('a');
		panel.hideHeader();
		panel.fixSize(true, true);
        me.statusGrid = panel.attachStatusBar();

		me.grid = panel.attachGrid();		
		me.grid.setImagePath(mainPath+'dhtmlx/imgs/');
		me.grid.setHeader("asig_bole,asig_mun,mun_detalle,Boleta,Fecha Inicio,Fecha Final,Observacion,usu_id,Nombre");
		me.grid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro");
		me.grid.setColAlign("right,center,center,left,left,left,left,left,left");
		me.grid.setInitWidths("0,20,73,*,*,*,*,20,20");
		me.grid.init();
        me.grid.setColumnColor("#E5E5E5");
		me.grid.load(mainPath+"index.php/Asig_usu/asigUMBgrid_data?usu_id="+idUsuario, function(){
            me.grid.groupBy(2);
            me.grid.setColumnHidden(2,true);
            me.grid.setColumnHidden(1,true);
            me.grid.setColumnHidden(7,true);
            me.grid.setColumnHidden(8,true);
			me.statusGrid.setText("Numero de Registros: "+me.grid.getRowsNum());
           // me.grid.setColumnHidden(0,true);
		},"json");
        me.grid.attachEvent('onRowDblClicked', function(rId, cInd){
            //metaUpdateClass.widgetMain();
            //metaUpdateClass.form.setItemValue("preg_observacion", mdatosClass.grid.cells(rId,3).getValue());
            dhtmlx.alert("Aqui deveria llamar a la siguiente ventana del dise&ntilde;o");
        });
	},

	widgetMain: function(){
        var me = munbolClass;
		me.widgetWin();
		me.widgetGrid();
	}
 };